summaryrefslogtreecommitdiffstats
path: root/src/pages/article/[slug].tsx
Commit message (Collapse)AuthorAgeFilesLines
* fix(comments): load all comments on a postArmand Philippot2022-08-211-4/+4
| | | | | | | | | Previously, only the first 10 comments was loaded. So I update the fetching method to retrieve all the comments on a post. Also, I choose to order comments on client side because of a bug with WPGraphQL. Finally, I renamed the Comment type to SingleComment to avoid conflict with existing types.
* fix(article): prevent TypeError on buildArmand Philippot2022-07-231-3/+6
| | | | | | By switching to custom hooks for revalidating articles and comments, everything was working on development mode but articles failed to build for production.
* refactor(article): wrap useSWR with a custom hook to revalidate articleArmand Philippot2022-07-221-5/+3
|
* fix(comments): refresh comments on changes or new commentArmand Philippot2022-07-221-3/+2
|
* chore: handle article fallback and revalidationArmand Philippot2022-05-241-25/+26
| | | | | | By using useSWR I can fetch the changes from the backend. By using fallback, I can access new articles without rebuilding the entire app.
* fix: ensure all topics/thematics have the base urlArmand Philippot2022-05-231-6/+2
|
* refactor(schema): use helpers function to avoid repeat between pagesArmand Philippot2022-05-231-58/+36
|
* refactor: reduce the number of data transformationArmand Philippot2022-05-231-36/+7
|
* chore: update some stylesArmand Philippot2022-05-211-4/+1
| | | | | | | * Improve wp-blocks-columns, wp-block-quote and some images * Make Sharing widget consistent between pages * Remove margin option from lists * Fix Topic logo alignement
* refactor: rewrite Prism hooks and providersArmand Philippot2022-05-191-14/+40
| | | | | It avoid some hydratation errors on project pages (not in article however) and the hooks are now reusable.
* chore: use persistent layoutArmand Philippot2022-05-171-3/+13
| | | | | It prevents to rerender the common components between pages (header, footer...).
* chore: adjust articles stylesArmand Philippot2022-05-171-2/+16
| | | | | * change animation on article card hover * change comments section alignment
* chore: adjust and complete missing stylesArmand Philippot2022-05-161-4/+39
| | | | | | * add logo to topics pages and links * add Prism styles to articles * and a few other adjustements
* refactor: use custom hook for breadcrumb items and schemaArmand Philippot2022-05-161-18/+6
|
* chore: add Article pagesArmand Philippot2022-05-151-0/+251
|
* chore: remove old pages, components, helpers and typesArmand Philippot2022-04-291-291/+0
| | | | | Since I'm using new components, I will also rewrite the GraphQL queries so it is easier to start from scratch.
* refactor: load prism plugins without babelArmand Philippot2022-03-241-15/+43
|
* refactor: use formatjs swc pluginArmand Philippot2022-03-231-0/+7
| | | | | I'm not able to configure SWC plugins in Next.js so to make it works, all translation must have an id.
* refactor: split posts meta into smaller componentsArmand Philippot2022-03-011-2/+2
|
* refactor: replace script tags with next/script (#10)Armand Philippot2022-02-211-4/+6
| | | | | | | | * refactor: replace script tags with next/script Since next.js v12.1.0 some warnings was displayed because I was using some script tags. * build(deps): bump next-themes to v0.1.1
* fix: make schema.org markup valid (#4)Armand Philippot2022-02-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 49c1b3b1556a0eb91c429a961fedd2bded8ffd47 Author: Armand Philippot <git@armandphilippot.com> Date: Wed Feb 16 15:17:52 2022 +0100 chore: add headline field to blogPosting schema commit 42214c6f032cc899ec252a9387be35dcad738546 Author: Armand Philippot <git@armandphilippot.com> Date: Wed Feb 16 15:09:11 2022 +0100 chore: update the searchAction markup and add query-input Google was complaining about "query-input" which is not in Schema.org representation. So I added it. commit 5f29226d937cbdcd262df2793f1588435d850f02 Author: Armand Philippot <git@armandphilippot.com> Date: Wed Feb 16 14:32:14 2022 +0100 chore: remove breadcrumb from homepage The breadcrumb is not displayed on the homepage, so the breadcrumb field should not appear inside Schema markup.
* fix: update comments list when a new comment is sendArmand Philippot2022-02-141-5/+14
| | | | | The comments list was static before. If an user posted a comment, even after it was approved, the comments list was keeping the old state.
* fix: switch prism theme on single articleArmand Philippot2022-02-131-1/+1
| | | | I forgot to change the selector to query all code blocks.
* chore: update some texts to reduce its widthArmand Philippot2022-02-131-2/+2
| | | | | | | In French, "Utiliser le thème sombre" was a little too long, so instead I decided to remove the "Toggle" word and add an icon to help user understand the button purpose. Same way, "Aucune étoile" was too long, so I replace it with "0 étoile"
* chore: improve accessibilityArmand Philippot2022-02-111-2/+14
|
* fix(prism): translate toolbar buttons on single article pagesArmand Philippot2022-02-101-12/+31
| | | | | The translation was not always loaded the first time. So I decided to put the prism attributes manually instead.
* chore(prism): translate color scheme toggle buttonArmand Philippot2022-02-081-1/+6
|
* fix: handle getStaticPaths fallbackArmand Philippot2022-02-021-23/+29
| | | | | | | | I had errors with next build because of fallback. I need to return early if the path does not exists, if not Next complains about undefined variables. I don't think it was related but I also fix the paths format in getStaticPaths, I forgot the params object in some dynamic routes.
* chore: add a new settings to handle prism theme from toolbarArmand Philippot2022-02-011-0/+10
|
* chore: add a Prism plugin to set code blocks themeArmand Philippot2022-01-311-0/+1
|
* refactor(config): move config from config dir to utilsArmand Philippot2022-01-291-14/+14
|
* chore: replace lingui functions with react-intlArmand Philippot2022-01-291-2/+4
|
* chore(i18n): replace i18n provider and helpersArmand Philippot2022-01-291-6/+5
|
* fix: handle translation with linguiArmand Philippot2022-01-281-5/+4
| | | | | | | | The previous method was not working so I tried a different approach. Translation is loaded but I'm still getting warnings: * Plurals for locale undefined aren't loaded * Text content did not match I can't figure how to fix them...
* chore: add reading time in posts metaArmand Philippot2022-01-251-0/+3
|
* refactor: rename all subject occurrences into topicArmand Philippot2022-01-231-2/+2
| | | | | I change the name in graphql endpoint, so I decided to repercute this change here.
* chore: add opengraph and twitter metaArmand Philippot2022-01-191-5/+12
|
* refactor(config): move defaultLocale as property of config.localesArmand Philippot2022-01-191-2/+2
| | | | | I will need the country code, so I think it makes more sense to gather them inside the same property.
* chore: add structured data using schema.org and JSON-LDArmand Philippot2022-01-191-2/+65
| | | | I also added the featured image on single article.
* chore(meta): add a link to comments on single post pagesArmand Philippot2022-01-161-1/+1
|
* chore(comments): handle comment replyArmand Philippot2022-01-151-1/+2
|
* chore: update sidebar and widgets stylesArmand Philippot2022-01-151-5/+4
| | | | | | | | | I'm now using a widget that can be expanded/collapsed. It also allows me to handle more effectively widgets overflow and to avoid styles repetitions. However, with stylelint rule "no-descending-specificity", I'm not sure if the stylesheets are really logical... Maybe I should deactivate this rule.
* refactor(sidebar): use a component to avoid styles repetitionArmand Philippot2022-01-111-2/+3
| | | | | | I also fix some overflow/sticky issues. I have to set overflow auto only when there is no button-like links otherwise, with translate, the button is cropped on hover.
* refactor(aside): move width from aside to sharing widgetArmand Philippot2022-01-101-2/+1
| | | | Only the Sharing widget needs the "min-content" width.
* chore: improve comment sectionArmand Philippot2022-01-071-2/+0
| | | | I also adjust styles for all forms and primary buttons.
* chore: move Main grid to its childrenArmand Philippot2022-01-061-5/+9
| | | | This way I can use full width background for some blocks.
* refactor: reuse PostMeta components on single articles/pagesArmand Philippot2022-01-061-10/+15
|
* refactor: move Prism hook from layout to article pageArmand Philippot2022-01-041-0/+17
| | | | | I will not use Prism elsewhere, so it makes more sense to call Prism only inside articles.
* chore: add a sharing componentArmand Philippot2021-12-211-0/+2
|
* chore: add a table of contentsArmand Philippot2021-12-211-0/+2
|